package com.ehome.poct.backend.controller.device;

import com.ehome.core.page.Page;
import com.ehome.poct.base.api.dto.device.TestVersionRelationQry;
import com.ehome.poct.base.api.feign.device.TestDeviceVersionRelationFeginClient;
import com.ehome.poct.base.api.vo.device.TestDeviceVersionDataVO;
import com.ehome.poct.base.api.vo.device.TestVersionVO;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 设备表控制器
 *
 * @author yjm
 * @Date 2021-11-17 15:46
 */
@Slf4j
@Api(tags = "设备和版本关联表")
@RestController
@RequestMapping("/test_device_version_relation")
public class TestDeviceVersionRelationController {
    @Autowired
    private TestDeviceVersionRelationFeginClient feginClient;
    
    @ApiOperation("分页查询版本占比数据")
    @ApiOperationSupport(author = "瑶苏", order = 1)
    @GetMapping("/versionPage")
    public Page<TestDeviceVersionDataVO> page(TestVersionRelationQry qry) {
        return feginClient.page(qry);
    }
    
    @ApiOperation("查询版本数据")
    @ApiOperationSupport(author = "瑶苏", order = 2)
    @GetMapping("/getVersionData")
    public TestVersionVO getVersionData(TestVersionRelationQry qry) {
        return feginClient.getVersionData(qry);
    }
}
